package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysUserRoleService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class SysUserRoleServiceImpl implements ISysUserRoleService {
    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;
    @Override
    public Boolean insertUserRole(SysUserRole sysUserRole) {
        List<SysUserRole> list = new ArrayList<>();
        list.add(sysUserRole);
        int i = sysUserRoleMapper.batchUserRole(list);
        if (i > 0){
            return true;
        }
        return false;
    }
}
